<template>
	<view class="home">
		<u-navbar @leftClick="leftClick" @rightClick="rightClick" placeholder :safeAreaInsetTop="true" title="断面信息列表" :fixed="true" rightIcon="plus">
		</u-navbar>
		<view class="conttit">
			选择渠道断面信息
		</view>
				<view class="topitem" v-for="(item, index) in cezhanlist" :key="index" @click="urlCezhan(item)">
					<view class="topname">
						{{item.name}}
					</view>
					<view class="topdik">
						<view class="">
							测段底宽：
						</view>
						<view class="nubbb">
							{{item.qudikuandu}}
						</view>
					</view>
					<view class="topdik">
						<view class="">
							渠道断面：
						</view>
						<view class="nubbb" v-if="item.xingzhuang == 1">
							矩形
						</view>
						<view class="nubbb" v-if="item.xingzhuang == 0">
							梯形
						</view>
					</view>
					<view class="topdik">
						<view class="">
							测线条数：
						</view>
						<view class="nubbb">
							{{item.cexiantiaoshu}}
						</view>
					</view>
					<view class="topdik">
						<view class="">
							默认测法：
						</view>
						<view class="nubbb">
							{{item.morencefa}}点法
						</view>
					</view>
				</view>
		<!-- 切换 -->
		<view class="" style="height: 50rpx;">
			
		</view>
	</view>
</template>

<script>
	import {
		cezhan
	} from '@/common/cezhanlist.js';
	// import cezlist '@/common/cezhanlist.js'
	export default {
		data() {
			return {
				cezhanlist: [],
			}
		},
		onShow() {
			this.cezhanlist = this.vuex_saveCezhandata
		},
		onLoad(option) {

		},
		methods: {
			// 返回
			leftClick(){
				uni.navigateBack({
					delta: 1
				});
			},
			// 添加
			rightClick(){
				this.inCezhan()
			},
			inCezhan() {
				let ran01 = new Date().getTime()
				uni.navigateTo({
					url: '/pages/cezhanguanli/increaseShow?&id=' + ran01
				});
			},
			urlCezhan(item){
				uni.redirectTo({
					url: '/pagesA/aproductA/automaticCalCezhanShow?&id=' + item.id
				});
			}
		}
	}
</script>
<style scoped lang="scss">
	.topitem {
		width: 650rpx;
		margin: 20rpx auto;
		padding: 0 20rpx 20rpx 20rpx;
		border-radius: 30rpx;
		border: #ffffff solid 2rpx;
		box-shadow: 5rpx 5rpx 20rpx 5rpx #cad0d9;
		background-color: #ffffff;
		// background-color: #f4f6f8;

		.topname {
			font-size: 50rpx;
			padding: 15rpx;
			color: #498091;
			text-align: center;
			margin-bottom: 20rpx;
			border-bottom: #c6d5da solid 2rpx;
			// background-color: #ff8826;
		}

		.topdik {
			font-size: 40rpx;
			padding: 0 15rpx;
			line-height: 70rpx;
			color: #575f62;
			display: flex;
			align-items: center;

			// background-color: #ff8826;
			.nubbb {
				color: #498091;
			}
		}
	}

	.u-page {
		padding: 0;
	}

	.u-demo-block__title {
		padding: 10px 0 2px 15px;
	}

	.swipe-action {
		&__content {
			padding: 25rpx 0;

			&__text {
				font-size: 15px;
				color: $u-main-color;
				padding-left: 30rpx;
			}
		}
	}
	.conttit {
		width: 600rpx;
		margin: 0 auto;
		margin-top: 30rpx;
		text-align: center;
		color: #ffffff;
		padding: 20rpx 40rpx;
		font-size: 45rpx;
		border-radius: 30rpx;
		border: #ffffff solid 3rpx;
		box-shadow: 5rpx 5rpx 20rpx 5rpx #cad0d9;
		background-color: #498091;
		letter-spacing:30rpx;
	}
</style>
<style>
	page {
		/* background-color: #f8f8f8; */
	}
</style>